package com.purchase.ml.service.prod;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.purchase.ml.bean.base.ApiRestResult;
import com.purchase.ml.bean.req.dealer.DealerCategoryEditDto;
import com.purchase.ml.bean.req.dealer.DealerCategoryQueryDto;
import com.purchase.ml.bean.req.prod.SysCategoryEditDto;
import com.purchase.ml.bean.req.prod.SysCategoryNewDto;
import com.purchase.ml.bean.req.prod.SysCategoryQueryDto;
import com.purchase.ml.entity.dealer.SysDealer;
import com.purchase.ml.entity.prod.SysCategory;

import java.util.List;

public interface SysCategoryService extends IService<SysCategory> {
    /**
     * 新建产品类别
     * @param categoryNewDto
     * @return
     */
    ApiRestResult saveCategory(SysCategoryNewDto categoryNewDto);

    /**
     * 修改产品类别
     * @param categoryEditDto
     * @return
     */
    ApiRestResult editCategory(SysCategoryEditDto categoryEditDto);

    /**
     * 查询产品类别
     * @param categoryQueryDto
     * @return
     */
    IPage<SysCategory> categoryQuery(SysCategoryQueryDto categoryQueryDto);

    /**
     * 查询主经销商产品目录
     * @param queryDto
     * @return
     */
    IPage<SysCategory> dealerCategoryQuery(DealerCategoryQueryDto queryDto);

    /**
     * 修改主经销商目录
     * @param dealerCategoryEditDto
     * @return
     */
    ApiRestResult editDealerCategory(DealerCategoryEditDto dealerCategoryEditDto);

    /**
     * 删除产品目录，===》修改产品目录的状态
     * @param ids
     */
    void batchDeleteCategory(List<Long> ids);

    /**
     * 查询商店正常的产品目录
     * @param dto
     * @return
     */
    IPage<SysCategory> shopCategoryPage(SysCategoryQueryDto dto);
}
